import 'package:flutter/material.dart';
import '../view/auth_top_view.dart';
import '../../models/user_info_model.dart';
import '../view/auth_center_view.dart';
import '../../main.dart';
import '../../manger/qysdk_manger.dart';
class AuthBindView extends StatelessWidget {
  final int loginType;
  final UsssBingInfo? bingInfo;
  
  const AuthBindView({
    Key? key,
    required this.loginType,
    this.bingInfo,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
      
    return Scaffold(
  body: Stack(
    children: [
      Column(
        children: [
          AuthTopView(
            onBack: () => Navigator.pop(context),
            onHelp: () {
              QYSDK.showQYSession();
            },
            loginType: loginType,
          ),
          const SizedBox(height: 100), // 给 overlap 留出位置
        ],
      ),
      Positioned(
        top: 240,
        left: 25,
        right: 25,
        child: AuthCenterView(
          bingInfo: bingInfo,
          loginType: loginType,
          onThridLoginSuccess: () {
            Navigator.pushReplacement(
              context,
              MaterialPageRoute(
                builder: (context) => MainPage(),
              ),
            );
          },
        ), // 自带内容撑高
      ),
    ],
  ),
);
  }

}
